using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class hypertension_historyMap : EntityTypeConfiguration<hypertension_history>
    {
        public hypertension_historyMap()
        {
            // Primary Key
            this.HasKey(t => t.hypertension_history_id);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.first_diagnosis_hypertension_date)
                .HasMaxLength(4);

            this.Property(t => t.down_bloodpressure_treatment)
                .HasMaxLength(1);

            this.Property(t => t.hypertension_past_treatment_effect)
                .HasMaxLength(500);

            this.Property(t => t.hypertension_past_treatment_reaction)
                .HasMaxLength(200);

            this.Property(t => t.heart_failure)
                .HasMaxLength(1);

            this.Property(t => t.heart_failure_date)
                .HasMaxLength(4);

            this.Property(t => t.symptom_bronchial_asthma)
                .HasMaxLength(1);

            this.Property(t => t.symptom_bronchial_asthma_date)
                .HasMaxLength(4);

            this.Property(t => t.symptom_peripheral_vascular)
                .HasMaxLength(1);

            this.Property(t => t.symptom_peripheral_vascular_date)
                .HasMaxLength(4);

            this.Property(t => t.symptom_sexual_dysfunction)
                .HasMaxLength(1);

            this.Property(t => t.symptom_sexual_dysfunction_date)
                .HasMaxLength(4);

            this.Property(t => t.symptom_gout)
                .HasMaxLength(1);

            this.Property(t => t.symptom_gout_date)
                .HasMaxLength(4);

            this.Property(t => t.symptom_sleep_apnea)
                .HasMaxLength(1);

            this.Property(t => t.symptom_sleep_apnea_date)
                .HasMaxLength(4);

            this.Property(t => t.nephritis_history)
                .HasMaxLength(1);

            this.Property(t => t.anemia_history)
                .HasMaxLength(1);

            this.Property(t => t.myasthenia_histoty)
                .HasMaxLength(1);

            this.Property(t => t.episodes_Flaccid_Paralysis_history)
                .HasMaxLength(1);

            this.Property(t => t.paroxysmal_headache_histoty)
                .HasMaxLength(1);

            this.Property(t => t.palpitations_history)
                .HasMaxLength(1);

            this.Property(t => t.hyperhidrosis_history)
                .HasMaxLength(1);

            // Table & Column Mappings
            this.ToTable("hypertension_history");
            this.Property(t => t.hypertension_history_id).HasColumnName("hypertension_history_id");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.first_diagnosis_hypertension_date).HasColumnName("first_diagnosis_hypertension_date");
            this.Property(t => t.sbp_highest_SBP).HasColumnName("sbp_highest_SBP");
            this.Property(t => t.sbp_highest_DBP).HasColumnName("sbp_highest_DBP");
            this.Property(t => t.down_bloodpressure_treatment).HasColumnName("down_bloodpressure_treatment");
            this.Property(t => t.hypertension_past_treatment_effect).HasColumnName("hypertension_past_treatment_effect");
            this.Property(t => t.hypertension_past_treatment_reaction).HasColumnName("hypertension_past_treatment_reaction");
            this.Property(t => t.heart_failure).HasColumnName("heart_failure");
            this.Property(t => t.heart_failure_date).HasColumnName("heart_failure_date");
            this.Property(t => t.symptom_bronchial_asthma).HasColumnName("symptom_bronchial_asthma");
            this.Property(t => t.symptom_bronchial_asthma_date).HasColumnName("symptom_bronchial_asthma_date");
            this.Property(t => t.symptom_peripheral_vascular).HasColumnName("symptom_peripheral_vascular");
            this.Property(t => t.symptom_peripheral_vascular_date).HasColumnName("symptom_peripheral_vascular_date");
            this.Property(t => t.symptom_sexual_dysfunction).HasColumnName("symptom_sexual_dysfunction");
            this.Property(t => t.symptom_sexual_dysfunction_date).HasColumnName("symptom_sexual_dysfunction_date");
            this.Property(t => t.symptom_gout).HasColumnName("symptom_gout");
            this.Property(t => t.symptom_gout_date).HasColumnName("symptom_gout_date");
            this.Property(t => t.symptom_sleep_apnea).HasColumnName("symptom_sleep_apnea");
            this.Property(t => t.symptom_sleep_apnea_date).HasColumnName("symptom_sleep_apnea_date");
            this.Property(t => t.nephritis_history).HasColumnName("nephritis_history");
            this.Property(t => t.anemia_history).HasColumnName("anemia_history");
            this.Property(t => t.myasthenia_histoty).HasColumnName("myasthenia_histoty");
            this.Property(t => t.episodes_Flaccid_Paralysis_history).HasColumnName("episodes_Flaccid_Paralysis_history");
            this.Property(t => t.paroxysmal_headache_histoty).HasColumnName("paroxysmal_headache_histoty");
            this.Property(t => t.palpitations_history).HasColumnName("palpitations_history");
            this.Property(t => t.hyperhidrosis_history).HasColumnName("hyperhidrosis_history");
        }
    }
}
